ifeq ($(ARCH),arm)
	cross_compile=arm-fsl-linux-gnueabi-
else	
	cross_compile=
endif

src=$(wildcard *.cpp)
obj=$(patsubst %.cpp,%.o,$(src))

target=shoot

all: $(obj)
	$(cross_compile)g++ $(obj) -o $(target)
	echo "ok"

%.o:%.cpp
	$(cross_compile)g++  -c $< -o $@
	
clean:
	rm -fr $(obj) $(target)
	

.PHONY:clean all


